package com.sina.shop.domain.collect;

import com.sina.shop.domain.business.Business;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2017-12-11-15:48
 */
@Entity
@Table(name = "tb_collect_business")
@DiscriminatorValue("1")
@DynamicUpdate
@DynamicInsert
public class CollectBusiness extends Collect {

    @ManyToOne(cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
    @JoinColumn(name = "bid")
    private Business business;//收藏的店家

    public Business getBusiness() {
        return business;
    }

    public void setBusiness(Business business) {
        this.business = business;
    }
}
